<?php Yii::app()->ClientScript->registerCssFile(Yii::app()->theme->baseUrl.'/styles/modules.css'); ?>
<h2 style="padding: 0px; height: 25px">Installed modules</h2>
<?php foreach(Yii::app()->modules as $id => $params): ?>
        <?php
//                    $url = $this->createUrl('/'.$id.'/admin/dashboard');
        $url = $this->createUrl('/Cms/admin/modules/dashboard', array('module' => $id));
        $image = '/images/modules/';
        if (file_exists(Yii::app()->theme->basePath . $image . $id . '.png'))
            $image .= $id.'.png';
        else
            $image .= 'default.png';
        ?>
        <div class="ModuleInfo">
            <a href="<?php echo $url?>"><img src="<?php echo Yii::app()->theme->baseUrl.$image; ?>" alt="<?php echo $id; ?>" /></a>
            <div><a href="<?php echo $url?>"><?php echo $id; ?></a></div>
        </div>
<?php endforeach; ?>
